/**
 * WebModuleServiceImpl.java
 * @author
 * 作者 屈甲康 
 */
package org.jackysoft.service.impl;

import java.util.Collection;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jackysoft.entity.WebModule;
import org.jackysoft.service.AbstractIdentifiedService;
import org.jackysoft.service.WebModuleService;
import org.jackysoft.util.WebModuleState;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class WebModuleServiceImpl extends AbstractIdentifiedService<WebModule>
implements WebModuleService {
    /**
	 * 
	 */
	private static final long serialVersionUID = -1879691861308417309L;
	final static Log logger = LogFactory.getLog(WebModuleServiceImpl.class);

	public WebModuleServiceImpl(){	   
	    super(WebModule.class);
	}

	@Override
	public Collection<WebModule> getModuleByState(WebModuleState state)
			throws DataAccessException {
		String hql = HQL("from %s where state=?",entitytable());
		List list = query(hql).setParameter(1, state).list();
		return list;
	}	
		
}